package com.sc.nft.entity.dto;

import com.sc.nft.entity.MallProfitTemplate;
import com.sc.nft.enums.MallProfitTemplateTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.math.BigDecimal;
import java.util.List;

/**
 * 分润模版后台详情
 *
 * @author liGen
 * @version 1.0
 * @date 2024/1/9 5:28 下午
 */
@Data
public class MallProfitTemplateAdminDetailDTO {

    @ApiModelProperty("id")
    private Long id;

    @ApiModelProperty(value = "模版名称")
    private String templateName;

    @ApiModelProperty(value = "模版类型")
    private MallProfitTemplateTypeEnum templateType;

    @ApiModelProperty(value = "直推收益比例")
    private BigDecimal directIncome;

    @ApiModelProperty(value = "关联藏品")
    private List<Long> collectionIds;

    @ApiModelProperty(value = "关联藏品名称")
    private List<String> collectionNames;

    @ApiModelProperty(value = "供应商推荐人收益比例")
    private BigDecimal supplierReferrerIncome;

    @ApiModelProperty(value = "地图省级收益比例")
    private BigDecimal mapIncome;

    @ApiModelProperty(value = "城市服务中心收益比例")
    private BigDecimal urbanServiceCenterIncome;

    @ApiModelProperty(value = "社区工作室收益比例")
    private BigDecimal communityStudioIncome;

    @ApiModelProperty(value = "NONO商城收益比例")
    private BigDecimal mallIncome;

    @ApiModelProperty(value = "玛特收益比例")
    private BigDecimal metaIncome;

    @ApiModelProperty(value = "玛特收益daoId")
    private Long metaIncomeDaoId;

    @ApiModelProperty(value = "瓜分分润比例")
    private BigDecimal carveUpRatio;

    @ApiModelProperty(value = "排行榜分润比例")
    private BigDecimal rankingListRatio;

    @ApiModelProperty(value = "生态商品收益比例")
    private BigDecimal ecologicalCommodityIncome;

    @ApiModelProperty(value = "生态商品收益daoId")
    private Long ecologicalCommodityIncomeDaoId;

    @ApiModelProperty(value = "购买人网体所属DAO分润比例")
    private BigDecimal purchaserDaoRatio;

    @ApiModelProperty(value = "平台收益比例")
    private BigDecimal ecologicalCommodityIncomeDaoRatio;


    public static MallProfitTemplateAdminDetailDTO build(MallProfitTemplate mallProfitTemplate){
        MallProfitTemplateAdminDetailDTO mallProfitTemplateAdminDetailDTO = new MallProfitTemplateAdminDetailDTO();
        BeanUtils.copyProperties(mallProfitTemplate, mallProfitTemplateAdminDetailDTO);
        return mallProfitTemplateAdminDetailDTO;
    }
}
